#ifndef GEOMETRY_H
#define GEOMETRY_H

#include <vector>

struct point
{
public:
   double x, y;
   point(double a, double b):
      x(a),
      y(b)
   {}

   point(){};
};

struct node
{
public:
   point p;
   bool exist;
   bool orientation;

   node()
   {
      exist = false;
   }
   
   node(point p1, bool cmp):
      p(p1),
      orientation(cmp)
   {
      exist = true;
   }
};

struct kd2tree
{
private:
   std::vector<node> nodes;

   void make_tree(point* arr, int, int, bool);
   std::vector<point> get_points(point, point, int);
public:
   kd2tree(const std::vector<point> &);
   std::vector<point> find_points(point, point);
};
#endif
